1. Field of the Invention
The present invention relates to an apparatus and a method for mobile communication by using a non-volatile memory device, and in particular for avoiding a conflict occurring in the non-volatile memory device.
2. Description of the Related Art
Fragmentation is a phenomenon that leads to inefficiency in many forms of data storage of computers and other electronic devices. A NAND-type flash memory device to be used for secondary storage, e.g., may be fragmented while continuously being used. In such a case, the NAND-type flash memory device may not have contiguous free storage of a significant size, but may have free regions of storage of varying sizes at intervals.
Assume, e.g., that a mobile communication apparatus capable of receiving television (TV) broadcast records a received TV program to a built-in NAND-type flash memory device. If the TV program data of high speed and large size are written to the NAND-type flash memory device which has been fragmented, some of the data may be unexpectedly lost due to a processing load being too heavy for the mobile communication apparatus as a processing system.
Thus, the NAND-type flash memory device needs defragmentation or garbage collection so as to solve the fragmentation. A defragmentation or garbage collection process may need a certain amount of time to be performed, though.
A communication apparatus (a mobile phone) configured to perform garbage collection without sacrificing operability is disclosed in Japanese Patent Publications of Unexamined Applications (Kokai), No. 2005-20540. More specifically, as disclosed in paragraphs 0013 and 0017 of JP 2005-20540, the mobile phone may perform garbage collection so as to reclaim unused regions of storage, to arrange the regions of storage in order and to form contiguous free storage while data files stored in a flash memory device are not being accessed.
The mobile phone of JP 2005-20540 performs garbage collection while no data files stored in the flash memory device are accessed and a user of the mobile phone is unaware of the garbage collection being performed, by taking advantage of characteristics of the mobile phone such as:    (1) while making a voice call;    (2) while processing a voice call arrival;    (3) during a voice call;    (4) while a folder is being closed in a case where the mobile phone is of a folder type,    (5) during a power-off process after power is turned off;    (6) during a power-on process after power is turned on;    (7) at a time, collectively, set by the user according to the user's way of use; or    (8) at a free time automatically determined based on data of sending and receiving voice calls and e-mails, e.g., stored for a last week.
By performing the garbage collection as described above, the mobile phone of JP 2005-20540 may immediately write data to the free storage of the flash memory device upon receiving a new e-mail.
The mobile phone of JP 2005-20540 has been devised so that a period of time in which a data file stored in the flash memory device is accessed and a period of time in which the garbage collection is performed do not conflict with each other. In a mobile communication apparatus such as a mobile phone, however, an interrupt may occur at a timing that the user does not expect such as, e.g., writing data of an e-mail to the flash memory device after the e-mail is received, reading a ring tone from the flash memory device to play back the ring tone after an e-mail or a voice call arrives, or writing message data left on a built-in answering machine function to the flash memory device after a voice call arrives.
One of the above interrupts, if occurring while the mobile phone is performing the garbage collection, conflicts with the garbage collection on the flash memory device. In such a case, there is a problem that the mobile phone more or less loses operability, as it is necessary to forbid one of the interrupt and the garbage collection.